package com.atguigu.gmall.payment.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * projectName: gmall
 *
 * @author: 陈鹏
 * time: 2022/10/15 19:07 星期六
 * description: 微信支付的feign的api
 */
@FeignClient(name = "service-payment", path = "/wx/pay", contextId = "wxPayFeign")
public interface WxPayFeign {

    /**
     * 获取支付二维码的地址
     * @param body
     * @param orderId
     * @param money
     * @return
     */
    @RequestMapping(value = "/getPayCodeUrl")
    public Map<String,String> getPayCodeUrl(@RequestParam String body,
                                            @RequestParam String orderId,
                                            @RequestParam String money);

    /**
     * 查询支付结果 :兜底方案
     * @param orderId
     * @return
     */
    @RequestMapping(value = "getPayResult")
    public Map<String,String> getPayResult(@RequestParam String orderId);
}
